class MemberLevel {
  final String id;
  final String name;
  final String description;
  final int price;
  final int duration;
  final List<String> features;

  MemberLevel({
    required this.id,
    required this.name,
    required this.description,
    required this.price,
    required this.duration,
    required this.features,
  });

  factory MemberLevel.fromJson(Map<String, dynamic> json) => MemberLevel(
    id: json['id'] as String,
    name: json['name'] as String,
    description: json['description'] as String,
    price: json['price'] as int,
    duration: json['duration'] as int,
    features: (json['features'] as List).map((e) => e as String).toList(),
  );

  Map<String, dynamic> toJson() => {
    'id': id,
    'name': name,
    'description': description,
    'price': price,
    'duration': duration,
    'features': features,
  };
}